import request from '@/utils/request'

// 获取树状机构信息
export function getTreeOrganApi () {
  return request({
    method: 'GET',
    url: '/business-hall/tree'
  })
}
// 获取机构业务范围
export function getOrganArea (id) {
  return request({
    method: 'GET',
    url: `/business-hall/scope/${id}/1?0=${id}`
  })
}

// 删除作业范围
export function delWorkArea (id, type) {
  return request({
    method: 'DELETE',
    url: `/business-hall/scope/${id}/${type}`
  })
}

// 保存业务范围
export function saveDeliveryArea (data) {
  return request({
    method: 'POST',
    url: '/business-hall/scope',
    data
  })
}
